extends "../cTDM_1/cTDM_1.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "冰法"
	lv = 3
	attCoe.atk = 26 / 8.5 * 2 / 3
	attCoe.maxHp = 720 / 112.5 / 3
	addCdSkill("dfs",13)
	addCdSkill("dfs1",9)
	addSkillTxt("冰临：对敌方所有单位造成200%魔法伤害，50%附加2层<结霜>，33%附加1层<冻结>[cd:9秒]")
	addSkillTxt("冰雨：召唤冰雨连续8次对目标及1格内单位造成(12+33%)的魔法伤害,附加3层<结霜>[cd:13秒]")

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "dfs":
		var cell = aiCha.cell
		for i in range(8):
			var eff:Eff = newEff("sk_bingYu")
			eff.position = aiCha.position
			eff.scale *= 2
			#yield(reTimer(0.1),"timeout")
			var chas = getCellChas(cell,1)
			for i in chas:
				if i != null: 
					hurtChara(i,12+att.atk*0.33,Chara.HurtType.MGI,Chara.AtkType.SKILL)
					i.addBuff(b_jieShuang.new(3))
	if id == "dfs1":
		var chas = getAllChas(1)
		if !chas.size():return
		for i in chas:
			hurtChara(i,att.atk * 2,Chara.HurtType.MGI,Chara.AtkType.SKILL)
			if sys.rndPer(50):
				if !i:continue
				i.addBuff(b_jieShuang.new(2))
			if sys.rndPer(33):
				if !i:continue
				i.addBuff(ctrl.b_bingdong.new(1))